@extends('layouts.home')
@section('title')
  主页
@stop
@section('content')

<div class="container lists">
  <div class="lists-header">
    <p>待办清单<span class="badge">{{$lists_number}}</span></p>
    <a href="lists"><button class="btn btn-default" type="submit">创建任务</button></a>
  </br>
  </br>
  </div>
    @foreach ($lists as $lists)
    <div class="col-lg-3 col-md-3 col-xl-6 lists-name">
    <p class="text-center" ><span class="label label-info">{{$lists->family}}</span>{{$lists->name}}</p>
    <form action="/lists/finish/{{$lists->id}}" method="POST">
      {{ csrf_field() }}
      {{ method_field('DELETE')}}
      <button class="btn btn-default" type="submit">完成</button>
    </form>
    </div>
    @endforeach

</div>

<div class="container memories">
  <div class="memories-header">
    <p>记忆项目<span class="badge">{{$memories_number}}</span></p>
  </div>
  @foreach ($memories_else as $memories)
    <div class="col-lg-3 col-md-3 col-xl-6 list-group memories-item">
    <h3 class="list-group-item-heading" >{{$memories->name}}<span class="label label-info">{{$memories->family}}</span></h3>
    <p class="list-group-item-text">{{$memories->content}}</p>
    <form action="/memories_remeber/{{$memories->id}}" method="POST">
      {{ csrf_field() }}
      {{ method_field('POST')}}
      <button class="btn btn-default" type="submit">Next:{{$memories->recall_style}}</button>
    </form>
    </div>
    @endforeach

    @foreach ($memories_links as $memories)
      <div class="col-lg-3 col-md-3 col-xl-6 list-group memories-item">
      <h3 class="list-group-item-heading" >{{$memories->name}}<span class="label label-info">{{$memories->family}}</span></h3>
      <a class="list-group-item-text" href="{{$memories->content}}">点击链接进行复习</a>
      <form action="/memories_remeber/{{$memories->id}}" method="POST">
        {{ csrf_field() }}
        {{ method_field('POST')}}
        <button class="btn btn-default" type="submit">Next:{{$memories->recall_style}}</button>
      </form>
      </div>
      @endforeach



</div>

<div class="container links">
<p>常用链接</p>
    @foreach ($links as $links)
    <div class="col-lg-2 col-md-3 col-xl-6 links-name">
    <a class="text-center" href="{{$links->href}}">{{$links->name}}</a>
    </div>
    @endforeach

</div>

<div class="container targets">
<p>目标</p>

      <div class="col-lg-4 col-md-4 col-xl-12 targets-name">
      <p class="text-center">短期目标</p>
      @foreach ($targets_s as $targets)
      <p class="text-center" >{{$targets->name}}</p>
      @endforeach
      </div>

      <div class="col-lg-4 col-md-4 col-xl-12 targets-name">
      <p class="text-center">中期目标</p>
      @foreach ($targets_m as $targets)
      <p class="text-center" >{{$targets->name}}</p>
      @endforeach
      </div>

      <div class="col-lg-4 col-md-4 col-xl-12 targets-name">
      <p class="text-center">长期目标</p>
      @foreach ($targets_l as $targets)
      <p class="text-center" >{{$targets->name}}</p>
      @endforeach
      </div>
</div>

<div class="container readlinks">
<p>阅读链接</p>
    @foreach ($readlinks as $links)
    <div class="col-lg-12 col-md-12 col-xl-12 links-name">
    <a class="text-center" href="{{$links->href}}">{{$links->name}}{{$links->href}}</a>
    </div>
    @endforeach

</div>
@endsection
